
function selectorMultipleDoble(listaA,listaB){    
    var la=document.getElementById(listaA)
    var lb=document.getElementById(listaB)
    var laux=new Array()
    var caux=0
    for(var i=0;i<la.options.length;i++){        
        if(la.options[i].selected){     
            lb.options[lb.options.length]=new Option(la.options[i].text,la.options[i].value)            
        }else{
            laux[caux]=new Option(la.options[i].text,la.options[i].value)
            caux++;
        }
    }    
    var j=0;
    for(var i=la.options.length-1;i>-1;i--){
        if(i<caux){
            la.options[i]=laux[j++]
        }else{
            la.options[i]=null
        }
    }    
}
function showPanel(container,url,title,params,width,height,marginTop,inIframe,panel){
    var html='<div class="panel_protector">&nbsp;</div><div class="panel_base" align="center">'
    html+='<div class="panel_content" style="width:'+width+'px;height:'+height+'px;margin-top:'+marginTop+'px;"><div class="panel_header"><table width="100%">'
    html+='<tr><td valign="middle" align="center" id="'+panel+'_title">'+title+'</td><td align="center" width="18"><a href="javascript:" class="close" onClick="closePanel(\''+container+'\')">&nbsp;</a></td></tr></table></div>'
    html+='<div class="panel_body" align="center">'
    if(inIframe){
        html+='<iframe src="'+url+'" width="'+(width-4)+'" marginwidth="0" height="'+(height-4-20)+'" marginheight="0" align="top" scrolling="auto" frameborder="0"></iframe>'
    }else{
        html+='<div id="'+panel+'" class="panel_body_body" style="width:'+(width-2)+'px;height:'+(height-2-20)+'px;"><div class="panel_esperando">&nbsp;</div></div>'
    }
    html+='</div></div></div>';
    document.getElementById(container).innerHTML=html
    return panel;
}
function setTitlePanel(title,panel){
    document.getElementById(panel+'_title').innerHTML=title;
}
//for credits
function trucoSelects(clase){
    var tags=document.getElementsByTagName('select')
    for(var i=0;i<tags.length;i++){
        tags[i].className=clase
    }
}
function closePanel(container){
    trucoSelects('con_display')
    document.getElementById(container).innerHTML=''
}
function showProgressBar(name,div){
    var html='<div align="center">'
    html+='<div class="progress_bar" align="center">'
    html+='<div class="bar" align="left"><div class="value" id="'+name+'_value">&nbsp;</div></div>'
    html+='<div class="label" align="center" id="'+name+'_label"></div>'
    html+='</div></div>'
    var content=document.getElementById(div)
    if(!content){
        alert('No existe el contenedor para el progress bar "'+name+'"')
    }else{
        content.innerHTML=html
        setValueProgressBar(name,100)
    }
}
function setValueProgressBar(name,value){
    var content=document.getElementById(name+'_value')
    if(!content){
        alert('No existe el progress bar "'+name+'"')
    }else{
        content.style.width=''+(value*4)+'px'
        document.getElementById(name+'_label').innerHTML=value+'%'
    }
}



